<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>招聘管理-登陆</title>
    <link rel="stylesheet" href="layui/css/layui.css">
    <link rel="stylesheet" href="css/admin.css">
</head>
<body class="body1">
<div id="container">
    <div></div>
    <div class="admin-login-background">
        <!--<div class="admin-header">-->
        <!--<img src="image/ex_logo.png" class="admin-logo">-->
        <!--</div>-->
        <form class="layui-form" action="" lay-filter="example">
            <div>
                <i class="layui-icon layui-icon-username admin-icon admin-icon-username"></i>
                <input type="text" name="account" placeholder="请输入用户名"
                       autocomplete="off"
                       class="layui-input admin-input admin-input-username">
            </div>
            <div>
                <i class="layui-icon layui-icon-password admin-icon admin-icon-password"></i>
                <input type="password" name="password"
                       placeholder="请输入密码"
                       autocomplete="off"
                       class="layui-input admin-input">
            </div>
<!--            <div class="layui-form-item" style="background-color: white">-->
<!--                <label class="layui-form-label">选择身份</label>-->
<!--                <div class="layui-input-block">-->
<!--                    <input name="is_sf" value="1" type="radio" title="     管理员" checked="">-->
<!--                    <input name="is_sf" value="0" type="radio" title="     企业">-->
<!--                </div>-->
<!--            </div>-->

            <button type="button" class="layui-btn  admin-button" id="bt_login">登录</button>
<!--            <button type="button" class="layui-btn  admin-button" id="bt_login1">企业注册</button>-->

        </form>
    </div>
</div>
<script src="layui/layui.js"></script>
<script>
    layui.use(['form', 'layedit', 'laydate',"upload",], function(){
        var form = layui.form
            ,layer = layui.layer
            ,layedit = layui.layedit
            ,upload = layui.upload
            ,laydate = layui.laydate;




        //表单取值
        layui.$('#bt_login').on('click', function(){
            var data = form.val('example');

            // if (data.is_sf=="1"){
                if (data.account=="admin"&&data.password=="123456"){
                    layer.msg("登录成功");
                    location.href="index.html";
                }else {
                    layer.msg("账号密码不正确")
                }
            // }else {
            //     layui.jquery.ajax({
            //         url:"http://localhost:8080/company/login",
            //         data:{'account':data.account,"pwd":data.password},
            //         type:"Post",
            //         success:function(result){
            //             console.log(result);
            //             layer.msg(result.msg);
            //             if (result.data==null){
            //
            //
            //
            //             }else {
            //                 layui.data('user', {
            //                     key: 'id'
            //                     ,value: result.data.id
            //                 });
            //                 location.href="companyindex.html";
            //             }
            //         },
            //         error:function(result){
            //             // $.messager.alert('错误',result.msg);
            //         }
            //     });
            // }


        });
        //表单取值
        layui.$('#bt_login1').on('click', function(){

                    location.href="companyreg.html";


        });

    });
</script>




</body>
</html>
